<%--
  Created by IntelliJ IDEA.
  User: 吕旺平
  Date: 2019/12/3
  Time: 23:40
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://fentsoul.com" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<html>
<head>
	<title>搜索结果</title>
	<c:import url="/layout/_imports.jsp"></c:import>
</head>
<body>
<c:import url="/layout/_nav.jsp"></c:import>


<!--products-->
<div class="products">
	<div class="container">
		<h2><f:out jsp_for="type"></f:out>的搜索结果</h2>

		<div class="col-md-12 product-model-sec">
			<f:foreach jsp_for="goods" var="g">
				<div class="product-grid">
					<a href="/goods/detail/${g.id}">
						<div class="more-product"><span> </span></div>
						<div class="product-img b-link-stripe b-animate-go  thickbox">
							<img src="${g.cover}" class="img-responsive" alt="${g.name}" width="240" height="240">
							<div class="b-wrapper">
								<h4 class="b-animate b-from-left  b-delay03">
									<button>查看详情</button>
								</h4>
							</div>
						</div>
					</a>
					<div class="product-info simpleCart_shelfItem">
						<div class="product-info-cust prt_name">
							<h4>${g.name}</h4>
							<span class="item_price">¥ ${g.price}</span>
							<input type="button" class="item_add items" value="加入购物车" onclick="buy(${g.id})">
							<div class="clearfix"> </div>
						</div>
					</div>
				</div>
			</f:foreach>
			<div class="clearfix"> </div>
		</div>
		<div>
			<div style='text-align:center;'>
			<a class='btn btn-info' href="/goods/search?key=${Model.type}&page=0&size=${Model.size}" >首页</a>
			<%--<a class='btn btn-info' disabled >上一页</a>--%>
			<a class='btn btn-info'
			   href="/goods/search?key=${Model.type}&page=${Model.page-1}&size=${Model.size}"
			   <c:if test="${Model.page == 0}">disabled</c:if>
			>上一页</a>

			<h2 style='display:inline;'>[${Model.page+1}/${Model.total+1}]</h2>
			<h2 style='display:inline;'>[${Model.count}]</h2>
			<%--<h2 style='display:inline;'>[1/1]</h2>--%>
			<%--<h2 style='display:inline;'>[6]</h2>--%>
			<a class='btn btn-info' href="/goods/search?key=${Model.type}&page=${Model.page+1}&size=${Model.size}"
			   <c:if test="${Model.page == Model.total}">disabled</c:if> >下一页</a>
			<a class='btn btn-info'
			   href="/goods/search?key=${Model.type}&page=${Model.total}&size=${Model.size}">尾页</a>
			<%--<a class='btn btn-info' disabled >尾页</a>--%>
			<input type='text' class='form-control' style='display:inline;width:60px;' value=''/><a class='btn btn-info' href='javascript:void(0);' onclick='location.href="http://localhost:8080/test_cakeshop_jsp/index/goods.action?page="+(this.previousSibling.value)+"&typeid=5"'>GO</a>
		</div>
	</div>
</div>
<!--//products-->

<c:import url="/layout/_footer.jsp"></c:import>
</body>
</html>
